/**
 * @file fundScreening/Home.js
 *  基金筛选
 * @author
 */
 import React, {Component,PropTypes} from 'react';
 import {connect} from 'dva';
 import {routerRedux,Link,withRouter } from 'dva/router';
 import { Row,Col,Table} from 'antd';
 import Tabtitle from '../../../components/common/TabTitle';
 import ToolBar from '../component/Toolbar';
 import FilterTable from '../component/filterTable';

 import style from './home.less';
/**
 * [Fundpool description]
 * @param {[type]} filterList [方案名称数据]
 * @param {[type]} tag [所属model]
 * @param {[type]} lPortId  [产品id]
 * @param {[type]} productList [产品数据]
 * @param {[type]} tableList  [筛选表格数据]
 * @param {[type]} columnKpi [表格表头]
 * @param {[type]} pdtsearchId [产品模糊搜索id]
 */


const Fundpool = ({dispatch,fundpool,prolist,myattention,location:{pathname,query}}) => {
	if(fundpool.Homestatus){
		const {
			Homestatus,
			filterList,
			lPortId,
			tableList,
			columnKpi,
			sfkpiName,
			sfschemeid,
			sfschemename,
			pdtsearchId,
			ListPdt,
			isShow,
			productId,
			GroupList,
			ListPdt2
		} = fundpool;
		const { productList } = prolist;
		const { groupNumber,isPublic } = myattention;
		console.log("home>>>>>>fundpool",fundpool,myattention);
		const tag = "fundpool";
		return (
			<div>
				<Tabtitle value={'基金池'}/>
				<div className="page-fundpool-home content-inner">
					<Row>
						<ToolBar
							location={location}
							dispatch={dispatch}
							tag={tag}
							productList={productList}
							lPortId={lPortId}
							sfkpiName={sfkpiName}
							sfschemeid={sfschemeid}
							sfschemename={sfschemename}
							pdtsearchId={pdtsearchId}
							ListPdt={ListPdt}
							isShow={isShow}
							ListPdt2={ListPdt2}
						/>
					</Row>
					<Row>
						<FilterTable
							{...fundpool}
							GroupList={GroupList}
							groupNumber={groupNumber}
							tag={tag}
							isPublic={isPublic}
							Homestatus={Homestatus}
						/>
					</Row>
				</div>
			</div>
		)
	}else{
		return null
	}

}

Fundpool.propTypes = {}

export default connect(({fundpool,prolist,myattention})=>({fundpool,prolist,myattention}))(Fundpool)
